<template>
	<view class="farmlist">
		<view class="item" v-for="(d, index) in list" :key="index" @click="_click(d)">
			<view class="itemtop">
				<u--image :mode="'aspectFill'" :src="d.img" width="120rpx" height="120rpx"></u--image>
				<view class="rightcontent">
					<view class="fs-24 title">
						<view>
							<text>地块名称：</text>
							<text class="text2">{{ d.where }}</text>
						</view>
					</view>
					<view class="fs-24 mar-top10">操作类型：{{ d.cz }}</view>
					<view class="fs-24 mar-top10">操作人：{{ d.ren }}</view>
				</view>
			</view>
			<view class="itembottom fs-24">
				<view class="mar-top10">时间：{{d.time}}</view>
				<view class="mar-top10">补充说明：{{d.buchong?d.buchong:'无'}}</view>
			</view>
		</view>
	</view>
</template>

<script>
export default {
	name: 'uni-farmrecord',
	props: {
		list: {
			type: Array,
			default: () => [{ name: '番茄' }, { name: '番茄' }]
		}
	},
	data() {
		return {};
	},
	methods:{
		_click(d){
			console.log(1);
			this.$emit('itemClick',d)
		}
	}
};
</script>

<style lang="scss">
.farmlist {
	margin: 20rpx 30rpx 0;
	.item {
		background: #fff;
		margin-top: 20rpx;
		padding: 14rpx 18rpx 16rpx;
		border-radius: 8rpx;
		.itemtop {
			display: flex;
			.rightcontent {
				flex: 1;
				margin-left: 16rpx;
				align-items: center;
				.title {
					display: flex;
					justify-content: space-between;
					align-items: center;
					.text2 {
						margin-left: 10rpx;
					}
				}
			}
		}
		.itembottom{
			color: #B0B0B0;
		}
	}
}
</style>
